package com.dq.repository.user.centre;

import com.dq.domain.sys.user.Account;
import com.dq.domain.sys.user.center.UserAccountStaffUser;
import com.dq.domain.sys.user.user.BossUser;
import com.dq.domain.sys.user.user.StaffUser;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @Author luchangtong
 * @Date 2020/4/14 15:07
 */
public interface UserAccountStaffUserRepository extends JpaRepository<UserAccountStaffUser, Long> {
    UserAccountStaffUser findByAccountAndStaffUserAndDeletedFalse(Account account, BossUser staffUser);

    List<UserAccountStaffUser> findByAccountAndDeletedFalse(Account account);

    List<UserAccountStaffUser> findByDeletedFalseAndStaffUser(BossUser bossUser);

    List<UserAccountStaffUser> findByDeletedFalseAndStaffUserAndCreateTimeGreaterThanAndCreateTimeLessThanAndAccountAccountChangeType(BossUser staffUser, Long beginTime , Long endTime, Account.AccountChangeType accountChangeType);
}
